home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / ex / AllVehicles.c < prev    next >
C/C++ Source or Header  |  1990-05-15  |  929b  |  41 lines

  1. // AllVehicles.c -- LinkedList of all Vehicles
  2.  
  3. #include "AllVehicles.h"
  4. #include "AllLink.h"
  5. #include "nihclIO.h"
  6.  
  7. #define THIS    AllVehicles
  8. #define BASE    LinkedList
  9. #define BASE_CLASSES BASE::desc()
  10. #define MEMBER_CLASSES
  11. #define VIRTUAL_BASE_CLASSES
  12.  
  13. DEFINE_CLASS(AllVehicles,1,"$Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/ex/RCS/AllVehicles.c,v 3.0 90/05/15 22:43:14 kgorlen Rel $",NULL,NULL);
  14.  
  15. Link& AllVehicles::linkCastdown(Object& p) const
  16. {
  17.     return AllLink::castdown(p);
  18. }
  19.  
  20. void AllVehicles::addVehicle(AllLink& l)    { add(l); }
  21.  
  22. void AllVehicles::removeVehicle(AllLink& l) { remove(l); }
  23.  
  24. AllVehicles::AllVehicles(OIOin& strm) :
  25.     Object(strm),
  26.     LinkedList()
  27. {
  28.     unsigned n;
  29.     strm >> n;
  30.     while (n--) AllLink::readFrom(strm);
  31. }
  32.  
  33. AllVehicles::AllVehicles(OIOifd& fd) :
  34.     Object(fd),
  35.     LinkedList()
  36. {
  37.     unsigned n;
  38.     fd >> n;
  39.     while (n--) AllLink::readFrom(fd);
  40. }
  41.